<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        const obj = {
            name: '内网IP',
            ip: 0,
        }

        function getIp(obj) {
            return !Object.values(obj).some(item => typeof item === 'string' && item.toLocaleLowerCase().includes(
                '内网ip'))
        }
        function getMapObject(obj) {
            return Object.keys(obj).reduce((pre, key) => {
                const val = obj[key]
                if ([0, 1, -1].includes(+val)) {
                    pre[key] = '未知'
                } else {
                    pre[key] = val
                }
                return pre
            }, {})
        }
        console.log(getMapObject(obj))
    </script>
</head>

<body>

</body>

</html>